/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package servicios;

import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Gabriel
 */
public class Conector 
{
    public Conector()
    {
        try 
        {
            Class.forName("org.postgresql.Driver");
        } 
        catch (ClassNotFoundException e) 
        {
            Logger.getLogger(Conector.class.getName()).log(Level.SEVERE, null, e);
        }
    }
    public Connection getConexion() throws SQLException
    {
        String url = "jdbc:postgresql://localhost:5432/registro1";
        String usuario = "postgres";
        String clave = "postgres";
        return DriverManager.getConnection(url, usuario, clave);
    }
}
